import http from '../../utils/http'
// 获取通知列表
export const getTeacherNoticeList = (data?:{
  schoolId:number
})=>{
  return http({
    method:"GET",
    url:"/teacher/notice/list",
    data
  })
}
// 获取通知详情
export const getNoticeInfoDetail = (data:{
  noticeId:number
})=>{
  const type = getApp().getUserType()
  return http({
    method:"GET",
    url:`/${type === "01" ? "teacher" : "user"}/notice/getInfo`,
    data
  })
}
// 获取教师/用户请假记录
export const getLeaveGetList = (data:{
  pageNum?:number,
  pageSize?:number
})=>{
  const type = getApp().getUserType()
  return http({
    method:"GET",
    url:`/${type === "01" ? "teacher":"user"}/leave/getList`,
    data
  })
}

// 获取请假记录详情
export const getLeaveDetail = (data:{
  leaveId:number
})=>{
  return http({
    method:"GET",
    url:`/user/leave/getDetail`,
    data
  })
}
export const postTeacherCheck = (data:{
  leaveId:number,
  leaveStatu?:string,
  remark:string
})=>{
  return http({
    method:"POST",
    url:`/teacher/leave/check`,
    data
  })
}
